<template>
    <div>
      <square-button icon="el-icon-s-promotion" :title="title" class="agree-button" v-on="$listeners"  v-bind="$attrs" @click="doSomething(btn)"></square-button>

      <approver-list :visible.sync="approverInfo.visible" v-if="approverInfo.visible" @callback="approverInfo.callback" :data-list="approverInfo.dataList"  :showCheckbox="approverInfo.showCheckbox"></approver-list>
      <component :is="eventDialogInfo.component" v-if="eventDialogInfo.visible"  @callback="eventDialogInfo.callback" :row="row" v-bind="$attrs" :visible.sync="eventDialogInfo.visible"></component>
      <suggestion-common-dialog  v-if="suggestionInfo.visible" :visible.sync="suggestionInfo.visible" v-model="suggestionInfo.msg" @callback="suggestionInfo.callback" :btn="currBtn"></suggestion-common-dialog>
      <add-approver-list  :visible.sync="toAddVisible" v-if="toAddVisible" :data-list="approverDataList"></add-approver-list>
    </div>
</template>
<script>
    import SquareButton from "../SquareButton";
    import {mapGetters} from "vuex";
    import ButtonHandle from "@/mixins/ButtonHandle.js"
    import AddApproverList from "../AddApproverList";
    export default {
        name:"AgreeHandleButton",
        components: {AddApproverList,  SquareButton},
        mixins:[ButtonHandle],
        data() {
            return {
                visible:false,
                toAddVisible:false
            };
        },
        props:{
            title:{
                type:String,
                default:"同意"
            },
            btn:{
                type:Object,
                default:function () {
                    return {}
                }
            }
        },
        computed: {
        },
        methods:{
        }
    }
</script>
<style scoped>
.agree-button{
    background-color: #04a65b;
    color: #fff;
    border-color: #04a65b;
}
</style>
